class ChangeColumnsAddingNeccesaryConstraints < ActiveRecord::Migration
  def self.up
    change_column :dishes, :name, :string, :null=>false
    change_column :dishes, :price, :decimal, :null=>false
    change_column :orders, :total_price, :decimal, :null=>false, :default=>0
  end

  def self.down
    change_column :dishes, :name, :string
    change_column :dishes, :price, :decimal
    change_column :orders, :total_price, :decimal
  end
end
